define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_editBrand(result){
			if(false){
				result = '{"success": true,"msg": "","result": {"brand_id": "001"},"session": "7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			}else{
				return result;
			}
		}

		//返回信息
		return {
			edit_brand: function(name,id,url,explain,cat,logo,aptitude,callback) {
			    var params=new Object();
			    params.name=name;
			    params.id=id;
			    params.cat=cat;
			    params.logo=logo;
			    params.url=url;
			    params.explain=explain;
			    params.aptitude=aptitude;
			    params=JSON.stringify(params);
				//post请求
				Http.post({
					method:'member.brand.edit',
					updateParams:params
				}, function(result) {
					//函数回调
					if(callback)
						callback(get_data_editBrand(result));
				});
			},
			//品牌详情
			detail:function(brand_id,callback){
				Http.post({
					method:'member.brand.detail',
					brand_id:brand_id
				}, function(result) {
					//函数回调
					if(callback)
						callback(result);
				});
			}


		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Productmanager_brand_edit", factory);
});